<extend name="common:commonTemplate" />
<block name="main_content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="index.html"
				data-original-title="Go to Home"><i class="icon-home"></i> 首页</a> <a
				href="#">权限系统</a> <a class="current" href="#">用户详情</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i>
						</span>
						<h5>用户信息</h5>
					</div>
					<div class="widget-content nopadding">
						<form novalidate="novalidate" id="basic_validate"
							name="basic_validate" action="#" method="post"
							class="form-horizontal">
							
							<div class="control-group">
								<label class="control-label">id</label>
								<div class="controls">
									<input type="text" id="user_id" value="{$user_id}"   readonly="true" />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">用户名</label>
								<div class="controls">
									<input type="text" id="user_name" value="{$user_info.user_name}"  readonly="true"/>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">用户昵称</label>
								<div class="controls">
									<input type="text" id="user_nick" value="{$user_info.user_nick}"  />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">手机号码</label>
								<div class="controls">
									<input type="text" id="user_mobile" value="{$user_info.user_mobile}"  />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">地址</label>
								<div class="controls">
									<input type="text" id="user_address" value="{$user_info.user_address}"  />
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">密码</label>
								<div class="controls">
									<input type="password" placeholder="输入密码修改，不输入不变"  
										id="password" />
								</div>
							</div>
							
							<div class="control-group">
								<a id="btn_updateUser" class="btn btn-success">修改</a> 
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>

<block name="js_content"> <script>
		//修改商品
		$('#btn_updateUser').bind('click', function(){
			var user_id = $('#user_id').val();
			var user_name = $('#user_name').val();
			var user_nick = $('#user_nick').val();
			var user_mobile = $('#user_mobile').val();
			var user_address = $('#user_address').val();
			var password = $('#password').val();

			var result = AuthService.updateUser(user_id,user_name,user_nick,user_mobile,user_address,password);
			if (result.IsSuccess == 0) {
				alert(result.ErrorMsg);
				return;
			} else {
				alert('修改成功');
			}
		});

</script> 
</block>